import AxiosHttp from "../utlis/http";

let addCart = (data)=>AxiosHttp(`/api/front/cart/save`,'post',data);
// 获取购物车列表
let getCartList = ()=>AxiosHttp(`https://apif.java.crmeb.net/api/front/cart/list?page=1&limit=20&isValid=true`,'get');

// 添加购物车数量
let addCartNum = (data)=>AxiosHttp(`/api/front/cart/num`,'post',data,{
    'content-type':'application/x-www-form-urlencoded'
})
// 删除购物车商品
let removeCart = (data)=>AxiosHttp(`/api/front/cart/delete`,'post',data,{
    'content-type':'application/x-www-form-urlencoded'
})
export {
    addCart,
    getCartList,
    addCartNum,
    removeCart
};